package ru.jexp.rcp.supply.swtext;

import org.eclipse.core.databinding.observable.value.DecoratingObservableValue;
import org.eclipse.core.databinding.observable.value.IObservableValue;

public class LookupFieldObservableValue<ReturnedT, LookupT extends ILookup<ReturnedT>> extends DecoratingObservableValue
		implements ILookupFieldObservableValue
{
	private LookupField<ReturnedT, LookupT> field;

	@SuppressWarnings("unchecked")
	public LookupFieldObservableValue(IObservableValue decorated, Object source)
	{
		super(decorated, true);
		field = (LookupField<ReturnedT, LookupT>) source;
	}

	public void setInputValue(Object filter)
	{
		field.setLookupInput(filter);
	}
}
